Document Field Warp animations and transition#942
Document Field Warp animations and transition#942
Conversation
lhearachel
left a comment
There was a problem hiding this comment.
Looks good, just a few polish-bits to take care of.
| SysTask *task; | ||
| Location location; | ||
| } MapChangeDigData; | ||
| } MapChangeFieldWarpData; |
There was a problem hiding this comment.
suggestion: Trim Data from this name.
There was a problem hiding this comment.
I think I'm gonna leave this for now if that's ok, because it follows the pattern used by the other structs in this file (FieldChangeFlyData, FieldChangeFromErrorData, etc.). Will look into maybe doing a run-through of this file in the future.
src/field_map_change.c
Outdated
| } | ||
|
|
||
| void FieldTask_ChangeMapChangeByDig(FieldTask *task, const Location *location, u32 param2) | ||
| void FieldTask_ChangeMapChangeByFieldWarp(FieldTask *task, const Location *location, enum FieldWarpType fieldWarpType) |
There was a problem hiding this comment.
suggestion: ChangeMapByFieldWarp
src/field_map_change.c
Outdated
| if (mapChangeData->fieldWarpType == FIELD_WARP_TYPE_TELEPORT) { | ||
| FieldSystem_SetTeleportFlags(fieldSystem); | ||
| } else if ((mapChangeData->unk_04 == 0) || (mapChangeData->unk_04 == 1)) { | ||
| } else if ((mapChangeData->fieldWarpType == FIELD_WARP_TYPE_ESCAPE_ROPE) || (mapChangeData->fieldWarpType == FIELD_WARP_TYPE_DIG)) { |
There was a problem hiding this comment.
polish: Remove extraneous parens.
src/field_move_tasks.c
Outdated
|
|
||
| Heap_Free(v1); | ||
| FieldTask_InitJump(param0, ov6_02247554, v2); | ||
| FieldTask_InitJump(param0, FieldWarp_TeleportFadeOut, fieldWarp); |
There was a problem hiding this comment.
polish: Just for completeness, let's name param0 in the FieldTask functions that you're handling here.
| #ifndef POKEPLATINUM_FIELD_WARP_H | ||
| #define POKEPLATINUM_FIELD_WARP_H | ||
|
|
||
| #include "struct_decls/struct_02061AB4_decl.h" |
There was a problem hiding this comment.
note: Out of scope for your PR, but we should really clean up the MapObject struct declarations.
e6195d7 to
c1fca85
Compare
c1fca85 to
fa14b99
Compare
The file
field_warp.chandles the spinning animation and map transition that occurs when using Dig, Teleport, or an Escape Rope. Along with this documentation, I found that a series of functions infield_map_change.cthat were associated with Dig could actually be called from any of the 3 warp types, and so updated their names as well.